package com.wanxi.step07test.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.sql.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UserModel {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    private String username;
    private String password;
    private String sex;
    private String phone;
    private String email;
    private String address;

    @JsonFormat(pattern="yyyy-MM-dd",timezone= "GMT+8")
    private Date birthday;

    private String hobby;

    private Integer enable;
    private String remark;

    @Version
    private int version;

    //value 表示没有删的值，delval:表示删了的值
    @TableLogic(value = "0",delval = "1")
    private Byte isDeleted;

//    @JsonSerialize(using= ToStringSerializer.class)
//    private BigDecimal money;

    private String code;
    private String vCode;

    private String startBirthday;
    private String endBirthday;

    private Integer page;
    private Integer limit;


    private String createTime;
    private String updateTime;









}
